package GUI;

import java.util.ArrayList;


import javax.swing.tree.DefaultMutableTreeNode;

import Data.UserCategory;

public class CategoryNode extends DefaultMutableTreeNode{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3298808241168988155L;
	private UserCategory userCategory;
	private ArrayList<GroupNode> groupNodes;
	
	/**
	 * Constructor, which initialize the root node of the tree.
	 * @param userCategory
	 */
	CategoryNode(UserCategory userCategory) {
		groupNodes = new ArrayList<GroupNode>();	
		this.userCategory = userCategory;
	}
	/**
	 * Add a group node
	 * @param groupNode the group node.
	 */
	public void add(GroupNode groupNode) {
		super.add(groupNode);
		groupNodes.add(groupNode);
	}
	/**
	 * Get the current user category
	 * @return The user category.
	 */
	public UserCategory getUserCategory() {
		return userCategory;
	}
	
}
